package com.student_exam_system.service.impl;

import com.student_exam_system.dao.PaperClassMapper;
import com.student_exam_system.pojo.PaperClass;
import com.student_exam_system.service.PaperClassService;

import org.springframework.stereotype.Service;

import java.sql.Timestamp;
import java.util.List;
/**
 * @author fire'ge
 */
@Service("paperClassServiceImpl")
public class PaperClassServiceImpl implements PaperClassService {
    final
    PaperClassMapper paperClassMapper;

    public PaperClassServiceImpl(PaperClassMapper paperClassMapper) {
        this.paperClassMapper = paperClassMapper;
    }


    @Override
    public PaperClass queryPaperClassByUserIdAndPaperId(int paperId,int userId) {
        return paperClassMapper.queryPaperClassByClassPaperId(paperId,userId);
    }

    @Override
    public List<PaperClass> queryAllPaperClass() {
        return paperClassMapper.queryAllPaperClass();
    }

    @Override
    public List<PaperClass> queryPaperClassByLessCurrentTime(Timestamp timestamp) {
        return paperClassMapper.queryPaperClassByLessCurrentTime(timestamp);
    }
}
